Skip to content

Conversation

@KUTEJiang
Copy link
Contributor

@KUTEJiang KUTEJiang commented Oct 30, 2025

PR: Add Qoder CLI Support

Summary

This PR adds native support for Qoder CLI as an AI coding assistant tool in OpenSpec. Qoder users will now be able to leverage OpenSpec's specification-driven development workflow with dedicated slash commands and configuration files.

Features Added

1. Qoder Slash Commands

  • Added support for /openspec:proposal, /openspec:apply, and /openspec:archive commands
  • Commands are stored in .qoder/commands/openspec/ directory
  • Each command includes proper YAML frontmatter for Qoder's command palette:
    • Name: "OpenSpec: Proposal/Apply/Archive"
    • Description: Clear purpose statement for each command
    • Category: "OpenSpec"
    • Tags: ["openspec", "change"/"apply"/"archive"]

2. Qoder Configuration File

  • Created QoderConfigurator to manage QODER.md file at project root
  • Uses the same high-quality OpenSpec instructions as Claude Code
  • Automatically updates with OpenSpec markers to enable future updates

3. Integration Points

  • Added Qoder to the list of supported AI tools in the initialization prompt
  • Registered Qoder configurators in both tool and slash command registries
  • Updated documentation to include Qoder in the supported tools list

Changes Made

Core Implementation

  • src/core/configurators/qoder.ts: New configurator for QODER.md file management
  • src/core/configurators/slash/qoder.ts: New configurator for slash command files
  • src/core/config.ts: Added Qoder to the AI_TOOLS array
  • src/core/configurators/registry.ts: Registered Qoder tool configurator
  • src/core/configurators/slash/registry.ts: Registered Qoder slash command configurator

Documentation Updates

  • README.md: Added Qoder to the supported tools table and initialization description

Test Coverage

  • test/core/init.test.ts: Added comprehensive tests for Qoder configuration:
    • Slash command file creation
    • QODER.md file creation and updates
    • Extend mode configuration detection
  • test/core/update.test.ts: Added tests for Qoder file updates:
    • Refreshing existing slash command files
    • Preserving content outside markers
    • Not creating missing files during update

Usage

After initializing OpenSpec with Qoder selected:

  1. Users can use /openspec:proposal to create new change proposals
  2. /openspec:apply to implement approved changes
  3. /openspec:archive to archive completed changes
  4. A QODER.md file is created at the project root with OpenSpec instructions

Testing

All new functionality is covered by unit tests that verify:

  • Proper file creation and content
  • Correct YAML frontmatter
  • Marker-based content updates
  • Integration with existing OpenSpec workflows

Compatibility

This change is fully backward compatible and does not affect existing functionality. Users who don't select Qoder during initialization will not have any Qoder-specific files created.

Summary by CodeRabbit

  • New Features

    • Added Qoder (CLI) as a supported AI tool.
    • Enabled native slash command support for Qoder (proposal, apply, archive).
    • Automatically generates and maintains a Qoder configuration file in project root.
  • Tests

    • Added tests to validate Qoder slash command templates, configuration file creation, updates, and extend/update behaviors.

@KUTEJiang KUTEJiang requested a review from TabishB as a code owner October 30, 2025 14:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

Adds Qoder (CLI) as a new AI tool: README entry, AI_TOOLS export, ToolConfigurator and SlashCommandConfigurator implementations and registry registrations, plus tests covering init and update behaviors for Qoder templates and slash command files.

Changes

Cohort / File(s) Summary
Documentation
README.md
Adds Qoder (CLI) to supported AI tools table and updates initialization note to include Qoder among tools with native slash commands.
Tool Configuration
src/core/config.ts
Appends { name: 'Qoder (CLI)', value: 'qoder', available: true, successLabel: 'Qoder' } to AI_TOOLS.
Tool Initializer
src/core/configurators/qoder.ts
Adds QoderConfigurator implementing ToolConfigurator; writes/updates QODER.md at project root using Claude-compatible template and OpenSpec markers.
Tool Registry
src/core/configurators/registry.ts
Imports and registers QoderConfigurator under key 'qoder' in the tool registry map.
Slash Command Configurator
src/core/configurators/slash/qoder.ts
Adds QoderSlashCommandConfigurator (toolId 'qoder') with FILE_PATHS and FRONTMATTER mappings for proposal, apply, and archive commands; resolves relative paths and frontmatter.
Slash Registry
src/core/configurators/slash/registry.ts
Instantiates and registers QoderSlashCommandConfigurator in slash-command registry.
Init Tests
test/core/init.test.ts
Adds tests verifying creation and content of .qoder/commands/openspec/{proposal,apply,archive}.md, QODER.md generation and marker insertion, and preservation/update behavior in extend mode.
Update Tests
test/core/update.test.ts
Adds tests for refreshing existing Qoder slash command files on update and ensuring missing commands are not created during update; asserts file content and console output.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Init
    participant ToolRegistry
    participant QoderConfigurator
    participant FileSystem
    participant SlashRegistry
    participant QoderSlashConfigurator

    User->>Init: choose Qoder
    Init->>ToolRegistry: get 'qoder' configurator
    ToolRegistry->>Init: QoderConfigurator
    Init->>QoderConfigurator: configure(projectPath)
    QoderConfigurator->>FileSystem: write/update `QODER.md` (OpenSpec markers)
    FileSystem-->>QoderConfigurator: ack
    Init->>SlashRegistry: get 'qoder' slash configurator
    SlashRegistry->>Init: QoderSlashConfigurator
    Init->>QoderSlashConfigurator: generate commands
    QoderSlashConfigurator->>FileSystem: write .qoder/commands/openspec/*.md with frontmatter
    FileSystem-->>QoderSlashConfigurator: ack
    Init-->>User: Qoder configured
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Additive, pattern-following changes but touches multiple areas (config, registries, two configurator implementations, and tests).
  • Review focus suggestions:
    • src/core/configurators/qoder.ts — file update logic, marker boundaries, template sourcing.
    • src/core/configurators/slash/qoder.ts — correctness of path mappings and frontmatter content.
    • Tests in test/core/init.test.ts and test/core/update.test.ts — ensure assertions match marker insertion and update semantics.

Possibly related PRs

Poem

🐰 A little rabbit scampers near,
Qoder hops in—loud and clear!
Templates tucked in markers bright,
Slash commands ready—set to write.
Hooray for config, clean and tight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: add Qoder CLI support to configuration and documentation" directly and clearly summarizes the main change in the changeset. The PR adds Qoder as a new supported AI tool with configurators, slash commands, and configuration entries across multiple files, while also updating README.md to reflect this addition. The title is specific, mentioning both the subject (Qoder CLI support) and scope (configuration and documentation), making it clear to reviewers what the primary change entails without being vague or misleading.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4f0481 and 1ea0c31.

📒 Files selected for processing (8)
  • README.md (3 hunks)
  • src/core/config.ts (1 hunks)
  • src/core/configurators/qoder.ts (1 hunks)
  • src/core/configurators/registry.ts (2 hunks)
  • src/core/configurators/slash/qoder.ts (1 hunks)
  • src/core/configurators/slash/registry.ts (3 hunks)
  • test/core/init.test.ts (3 hunks)
  • test/core/update.test.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • README.md
  • test/core/update.test.ts
  • src/core/configurators/registry.ts
  • src/core/configurators/slash/qoder.ts
  • src/core/config.ts
🧰 Additional context used
🧬 Code graph analysis (3)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/qoder.ts (1)
  • QoderSlashCommandConfigurator (55-84)
src/core/configurators/qoder.ts (4)
src/core/configurators/base.ts (1)
  • ToolConfigurator (1-6)
src/core/templates/index.ts (1)
  • TemplateManager (14-47)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
src/core/config.ts (1)
  • OPENSPEC_MARKERS (3-6)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
  • fileExists (76-86)
🔇 Additional comments (6)
src/core/configurators/slash/registry.ts (1)

4-4: LGTM! Clean registry integration.

The Qoder slash command configurator is properly imported, instantiated, and registered following the exact same pattern as all other tools in the registry.

Also applies to: 24-24, 40-40

test/core/init.test.ts (4)

1053-1094: LGTM! Comprehensive slash command test.

The test properly validates Qoder slash command file creation, including file paths, YAML frontmatter structure (name, description, category), OpenSpec markers, and expected content for all three commands.


1096-1106: LGTM! Proper extend mode detection.

The test correctly verifies that Qoder is marked as already configured when running init in extend mode, consistent with other tool tests.


1123-1136: LGTM! QODER.md creation validated.

The test properly checks that QODER.md is created with OpenSpec markers and expected content when Qoder is selected during initialization.


1154-1170: LGTM! Complete QODER.md update test.

The test correctly validates that existing QODER.md is updated with OpenSpec markers while preserving custom content, with all necessary assertions present.

src/core/configurators/qoder.ts (1)

1-53: LGTM! Clean and consistent configurator implementation.

The QoderConfigurator follows the established pattern for tool configurators, properly implements the ToolConfigurator interface, and includes clear documentation. The use of Claude-compatible templates and marker-based updates aligns with the project's architecture.


Comment @coderabbitai help to get the list of available commands and usage tips.

TabishB
TabishB previously approved these changes Nov 1, 2025
Copy link
Contributor

@TabishB TabishB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the contribution @KUTEJiang

@TabishB TabishB force-pushed the feat/add-qoder-cli-support branch from c4f0481 to 1ea0c31 Compare November 1, 2025 08:37
@TabishB TabishB merged commit 4e93d7a into Fission-AI:main Nov 1, 2025
7 checks passed
@KUTEJiang
Copy link
Contributor Author

Looks good, thanks for the contribution @KUTEJiang

Thank you so much for your support and merging this! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants